package com.yun.kin.blog.service;

import com.yun.kin.blog.po.Type;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author jin
 * @Description
 * @Date 2021/3/3 15:18
 */
public interface TypeService {

    //保存--新增
    Type saveType(Type type);
    //查询
    Type getType(Long id);
    //分页查询
    Page<Type> listType(Pageable pageable);
    //修改
    Type updateType(Long id, Type type);
    //删除
    void deleteType(Long id);
    //通过名称开查是否存在
    Type getTypeByName(String name);

    List<Type> listType();

    List<Type> listTypeTop(Integer size);
}
